<template>
  <div :class="classObj">{{ name }}</div>
</template>
<script>
export default {
  name: 'Level',
  props: {
    name: {
      type: String,
      required: true
    },
    level: {
      type: Number,
      required: true
    }
  },
  data() {
    return {}
  },
  computed: {
    classObj: function () {
      const className = `level${this.level}`
      return {
        [className]: true,
        level: true
      }
    }
  },
  methods: {}
}
</script>
<style scoped>
.level2 {
  color: #ff4d4f;
}
.level1 {
  color: #f7b500;
}
.level0 {
  color: #262626;
}
</style>
